package com.example.demo.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "ErrorController", description = "error的控制层")
public class ErrorController {

    @ApiOperation("404")
    @GetMapping(value = "/404")
    public String to404() {
        return "error/404";
    }

    @ApiOperation("500")
    @GetMapping(value = "/500")
    public String to500() {
        return "error/500";
    }

    @ApiOperation("error")
    @GetMapping(value = "/error")
    public String toError() {
        return "error/error";
    }

}
